const ProjectConfig = require("../project/project_config.js");
const Login = require("../utils/privacy_login.js");

module.exports = Behavior({

  data: {
    b_currentPage: null,
    b_currentPagePath: null,
    b_service: ProjectConfig.Service,
    b_skey: Login.getLoginSkey()
  },

  attached: function () {
    const _this = this;
    // 获取当前页
    const pages = getCurrentPages();
    const currentPage = pages[pages.length - 1];
    _this.setData({
      b_currentPage: currentPage,
      b_currentPagePath: currentPage.route
    });
  }

})